# include in a class to gain quickly-configurable attributes
module Present::Configurable
  def initialize(options = {}, &block)
    options.each do |k, v|
      setter = "#{k}="
      raise "unknown attribute: #{k}" unless respond_to? setter
      send(setter, v)
    end

    yield self if block_given?
  end
end